//
//  OCSSOrderDetailCell.swift
//  OCSSStoreSwift
//
//  Created by MacMiniKangChe on 2018/10/16.
//  Copyright © 2018年 MacMiniKangChe. All rights reserved.
//

import UIKit
import SwiftyJSON

class OCSSOrderDetailCell: UITableViewCell {
    
    @IBOutlet weak var titleLab: UILabel!
    @IBOutlet weak var productCode: UILabel!
    @IBOutlet weak var price: UILabel!
    @IBOutlet weak var count: UILabel!
    
    @IBOutlet weak var storageHourse: UITextField!
    @IBOutlet weak var carNum: UITextField!
    
    
    var cellInfo:[String:Any]? {
        didSet{
            titleLab.text = JSON(cellInfo!["ProductName"]!).stringValue;
            productCode.text = String(format: "商品码 %@", JSON(cellInfo!["ProductCode"]!).stringValue);
            price.text = String(format: "单价 ￥%.2f", JSON(cellInfo!["SalesUnitPrice"]!).floatValue);
            count.text = String(format: "x%d", JSON(cellInfo!["Quantity"]!).intValue);
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    @IBAction func storageButtonEvent(_ sender: UIButton) {
    }
    @IBAction func carNumButtonEvent(_ sender: UIButton) {
    }
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
